{% extends 'store_admin/web_store/marketing.html' %}
{% load i18n %}
{% load store_admin_tags %}

{% block t_shows %}current_tab{% endblock %}

{% block title_sub_menu %}Shows{% endblock %}

{% block main %}
{% if shop.shows_feature_enabled %}
	<div class="bar_title">
		<div class="grid_2 alpha omega bar_column"><b>{% trans "Date"%}</b>
			<a href="./?sort_by=-date"><img src="{{ MEDIA_URL }}img/icon_down.gif"/></a>
			<a href="./?sort_by=date"><img src="{{ MEDIA_URL }}img/icon_up.gif"/></a>
		</div>
		<div class="grid_4 alpha omega bar_column"><b>{% trans "Show Name"%}</b>
			<a href="./?sort_by=name"><img src="{{ MEDIA_URL }}img/icon_down.gif"/></a>
		</div>
		<div class="grid_5 alpha omega bar_column"><b>{% trans "Address"%}</b></div>
		<div class="grid_4 alpha omega bar_column"><b>{% trans "Response"%}</b></div>
		<div class="grid_1 alpha omega bar_column"><b>{% trans "Edit"%}</b></div>
		<div class="clear"></div>
	</div>

	{% for show in active_shows %}
		<div class="{% cycle 'row_1' 'row_2' %}">
			<div class="grid_2 alpha omega column">{{ show.date_from }}</div>
			<div class="grid_4 alpha omega column">{{ show.name }}</div>
			<div class="grid_5 alpha omega column">
			{{ show.address }}, 
			{{ show.city }}, 
			{{ show.state }} ({{ show.zip }})
			</div>
			{% if show|will_go_show:shop %}
				<div class="grid_4 alpha omega column">I will go (<a href="{% url web_store_show_not_go show.id %}">{% trans "change to not going" %}</a>)</div>
			{% else %}
				<div class="grid_4 alpha omega column">I will not go (<a href="{% url web_store_show_go show.id %}">{% trans "change to going" %}</a>)</div>
			{% endif %}
			
			{% if show|my_show:shop %}
				<div class="grid_1 alpha omega column">
					<a href="{% url web_store_edit_show show.id %}"><img src="{{ MEDIA_URL }}img/edit.png"></a>
				</div>
			{% endif %}
			
			<div class="clear"></div>
		</div>
	{% endfor %}
	
	<p>
	<a class="awesome small" href="{% url web_store_add_show %}">Add Your Own Show</a>
	</p>
{% else %}
	<div class="enable_feature"><a class="enable_feature_box" href="{% url enable_feature 'show_attendance' %}">{% trans "Enable Show Listing Feature" %}</a><img src="{{ MEDIA_URL }}img/help-icon.png" onclick="javascript:show_help_text('htb_container');"/></div>
	
	<div class="htb_container">
		<img id="stick" src="{{ MEDIA_URL }}img/stick.png"/>
		<div class="help_text_box">
			{{ shop.shows_feature_help_text }}
			<div class="close"><img onclick="javascript: close_help_text('htb_container')" src="{{ MEDIA_URL }}img/remove.png"/></div>
		</div>
	</div>
{% endif %}

{% endblock %}